<?php
/**
 # mega_exiria - Mega Exiria Template for Joomla! 1.7
 # author 		OmegaTheme.com
 # copyright 	Copyright(C) 2011 - OmegaTheme.com. All Rights Reserved.
 # @license 	http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
 # Website: 	http://omegatheme.com
 # Technical support: Forum - http://omegatheme.com/forum/
**/
/**------------------------------------------------------------------------
 * file: index.php 1.7.0 00001, March 2011 12:00:00Z OmegaTheme $
 * package:	 Mega Exiria Template
 *------------------------------------------------------------------------*/
//No direct access!
defined( '_JEXEC' ) or die;
include_once(JPATH_ROOT . "/templates/" . $this->template . '/lib/splitmodules.php');
JHTML::_('behavior.framework', true);
$doc = &JFactory::getDocument();
//$doc->addScript(JURI::root().'/templates/'.$this->template.'/js/mega.script.js');
if($this->countModules('top-nav')){
	$doc->addScript(JURI::root().'/templates/'.$this->template.'/js/mega_menudropdown.js');
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $this->language; ?>" lang="<?php echo $this->language; ?>" >
<head>
<?php
	$menu =& JSite::getMenu();
	if($menu->getActive() == $menu->getDefault()){
		$home = true;
	}else{
		$home = false;
	}
?>
<jdoc:include type="head" />
	<link href="<?php echo $this->baseurl; ?>/templates/<?php echo $this->template; ?>/css/layout.css" rel="stylesheet" type="text/css" />
	<link href="<?php echo $this->baseurl; ?>/templates/<?php echo $this->template; ?>/css/template.css" rel="stylesheet" type="text/css" />
	<link href="<?php echo $this->baseurl; ?>/templates/<?php echo $this->template; ?>/css/typography.css" rel="stylesheet" type="text/css" />
	<link href="<?php echo $this->baseurl; ?>/templates/<?php echo $this->template; ?>/css/customs.css" rel="stylesheet" type="text/css" />
	<link href="<?php echo $this->baseurl; ?>/templates/<?php echo $this->template; ?>/css/menu.css" rel="stylesheet" type="text/css" />

<!--[if IE 6]>
	<link href="<?php echo $this->baseurl; ?>/templates/<?php echo $this->template?>/css/ie6.css" rel="stylesheet" type="text/css" />
<![endif]-->

<!--[if IE 7]>
	<link href="<?php echo $this->baseurl; ?>/templates/<?php echo $this->template?>/css/ie7.css" rel="stylesheet" type="text/css" />
<![endif]-->

<!--[if IE 8]>
	<link href="<?php echo $this->baseurl; ?>/templates/<?php echo $this->template?>/css/ie8.css" rel="stylesheet" type="text/css" />
<![endif]-->

<?php if($this->countModules('right')) {
	$fright = '';
}else{
	$fright = '_fr';
}
?>
<?php if($this->countModules('left')) {
	$fleft = '';
}else{
	$fleft = '_fl';
}
?>

</head>
<body id="mega_page">
	<div class="mega_wrapper">
		<div class="mega_wrapper_i">
			<div class="mega_header">
				<div class="header_i">
					<div class="logobox">
						<?php if($this->countModules('logo')) { ?>
						<jdoc:include type="modules" name="logo" />
						<?php } ?>
						<?php if(!$this->countModules('logo')) { ?>
						<a href="<?php echo JURI::base()?>"  class="logo"></a>
						<?php } ?>
					</div>
					<?php if($this->countModules('top-nav')) { ?>
					<div class="mega_menu">
						<div id="mega_menu">
							<jdoc:include type="modules" name="top-nav" />
						</div>
					</div>
					<?php } ?>
				</div>
			</div>
			<?php if($this->countModules('slider + newsline + follow')) {?>
			<div class="megaslider_meganewsline_follow">
				<div class="rounded_top">
					<div class="rounded_top_left">
						<div class="rounded_top_right"></div>
					</div>
				</div>
				<div class="rounded_mid">
					<div class="rounded_mid_i">
						<?php if($this->countModules('slider')) {?>
						<div class="mega_slider">
							<jdoc:include type="modules" name="slider" />
						</div>
						<?php }?>
						<?php if($this->countModules('newsline + follow')) {?>
						<div class="meganewsline_megafollow">
							<div class="meganewsline_megafollow_i">
								<?php if($this->countModules('newsline')) {?>
								<div class="meganewsline">
									<jdoc:include type="modules" name="newsline" />
								</div>
								<?php }?>
								<?php if($this->countModules('follow')) {?>
								<div class="megafollow">
									<jdoc:include type="modules" name="follow" />
								</div>	
								<?php }?>
							</div>
						</div>
						<?php }?>
					</div>
				</div>
				<div class="rounded_bot"></div>
			</div>
			<?php }?>
			<div class="mega_main_body">
				<div class="mega_main_body_i">
					<div class="rounded_top"></div>
					<div class="rounded_mid">
						<div class="rounded_mid_i">
							<div class="main_content">
								<div class="main_content_i">
									<?php if($this->countModules('left')) {?>
									<div class="left_column">
										<jdoc:include type="modules" name="left" style="round" />
									</div>
									<?php }?>
									<div class="front_page<?php echo $fleft;?><?php echo $fright;?>">
										<div class="front_page_i">
											<jdoc:include type="component" />
										</div>
									</div>
									<?php if($this->countModules('right')) {?>
									<div class="right_column">
										<jdoc:include type="modules" name="right" style="round" />
									</div>
									<?php }?>
								</div>
							</div>
							<!-- BOTTOM MODULES START HERE -->
			                <?php
			                $template = array ('botbox-1','botbox-2','botbox-3');
			                $bots = splitmodules ($this,$template,99);
			                if($bots) :
			                ?>
			                <?php if($this->countModules('botbox-1 + botbox-2 + botbox-3')) {?>
			                <div class="mega_bots" id="mega_bots">
			                    <div class="mega_bots_i" id="mega_bots_i">
			                      <?php if( $this->countModules('botbox-1')) {?>
			                      <div class="botbox botbox1<?php echo $bots['botbox-1']['class']; ?>" style="width: <?php echo $bots['botbox-1']['width']; ?>;">
			                            <jdoc:include type="modules" name="botbox-1" style="megabox" />
			                      </div>
			                      <?php }?>
			                      <?php if( $this->countModules('botbox-2')) {?>
			                      <div class="botbox botbox2<?php echo $bots['botbox-2']['class']; ?>" style="width: <?php echo $bots['botbox-2']['width']; ?>;">
			                            <jdoc:include type="modules" name="botbox-2" style="megabox" />
			                      </div>
			                      <?php }?>
			                      <?php if( $this->countModules('botbox-3')) {?>
			                      <div class="botbox botbox3<?php echo $bots['botbox-3']['class']; ?>" style="width: <?php echo $bots['botbox-3']['width']; ?>;">
			                            <jdoc:include type="modules" name="botbox-3" style="megabox" />
			                      </div>
			                      <?php }?>
			                    </div> 
			                </div>
			                <?php } endif;?>
			                <!-- END -->
			            </div>
			        </div>
			        <div class="rounded_fp_bot"></div>
				</div>
			</div>
			<div class="mega_footer">
				<div class="mega_footer_i">
					<div class="mega_copyright">
						<jdoc:include type="modules" name="copyright" />
					</div>
					<div class="top_page">
						<a href="#page">Top</a>
					</div>
				</div>
			</div>
		</div>
	</div>
	<div style="clear: both;"><jdoc:include type="modules" name="debug" /></div>
</body>
</html>